Add an early warning option to the temp target and override end alarms#721
Open
bjorkert wants to merge 2 commits into
Open
Add an early warning option to the temp target and override end alarms#721bjorkert wants to merge 2 commits into
bjorkert wants to merge 2 commits into
Conversation
The end alarms can now also fire a chosen number of minutes before the scheduled end, titled Temp Target Ending Soon or Override Ending Soon, and still fire normally when the event actually ends. Default is 0 which keeps the current behavior. Overrides keep their unclamped scheduled end so indefinite or long overrides do not warn incorrectly. Includes unit tests for both conditions.
Member
Author
…y-warning # Conflicts: # LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds an Early Warning setting to the Temp Target Ended and Override Ended alarms. It can be set from 0 to 30 minutes in steps of 5 and defaults to 0, which keeps the current behavior. With a lead time set, the alarm fires that many minutes before the scheduled end with the title Temp Target Ending Soon or Override Ending Soon, and then fires again as usual when it actually ends. Each firing happens at most once per event, and extending an active temp target or override arms a new warning for the new end time.
Overrides now carry their unclamped scheduled end next to the graph end date, which is capped to the display horizon. Indefinite Loop overrides have no known end and never trigger the early warning. The full screen alarm view shows the early warning title too.
Includes unit tests for both alarm conditions.